package com.gmp.thewizard;

import java.util.Comparator;
import android.graphics.Point;
import android.util.Log;

public class PathComparator implements Comparator<Point> {
	
	private static final String TAG = "PathComparator";
	
	public int compare(Point o1, Point o2){
		if(o1.y > o2.y){
			if(GameActivity.DEBUG) Log.d(TAG, "Sorting: " + o1.y + " > " + o2.y);
			return 1;
		} else if(o1.y < o2.y){
			if(GameActivity.DEBUG) Log.d(TAG, "Sorting: " + o1.y + " < " + o2.y);
			return -1;
		} else {
			if(GameActivity.DEBUG) Log.d(TAG, "Sorting: " + o1.y + " == " + o2.y);
			return 0;
		}
	}
}